package com.tgpms.web.earlierStage.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.tgpms.web.earlierStage.entity.ProjectInfo;

/**
* 表PROJECT_INFO -> null 的基本功能实现
*
* @author newway
* @createDate 2019/11/26
*/
@Mapper
public interface ProjectInfoMapper {
	
	//查询应思视图项目信息
	@Select("select * from gk_earlierstage_project where CODE=#{code}")
	List<Map<String, Object>> getEarlierstageProjectByCode(String code);

	//条件查询
	List<Map<String, Object>> selProjectInfo(@Param("map")Map<String, Object> map);
	
	//通过唯一键查询工程信息
    ProjectInfo selByUniqueKey(@Param("obsCode")String obsCode);
    
    /**
     * null  deleteByPrimaryKey 实现
     * 
     * @param piId
     * @return null int
     * @author: newway
     * @createDate: 2019-11-26 17:44:27
     */
    int deleteByPrimaryKey(String piId);

    /**
     * null  insert 实现
     * 
     * @param record
     * @return null int
     * @author: newway
     * @createDate: 2019-11-26 17:44:27
     */
    int insert(ProjectInfo record);

    /**
     * null  insertSelective 实现
     * 
     * @param record
     * @return null int
     * @author: newway
     * @createDate: 2019-11-26 17:44:27
     */
    int insertSelective(ProjectInfo record);

    /**
     * null  selectByPrimaryKey 实现
     * 
     * @param obsProject
     * @return null com.tgpms.web.earlierStage.entity.ProjectInfo
     * @author: newway
     * @createDate: 2019-11-26 17:44:27
     */
    ProjectInfo selectByPrimaryKey(String obsProject);

    /**
     * null  updateByPrimaryKeySelective 实现
     * 
     * @param record
     * @return null int
     * @author: newway
     * @createDate: 2019-11-26 17:44:27
     */
    int updateByPrimaryKeySelective(ProjectInfo record);

    /**
     * null  updateByPrimaryKey 实现
     * 
     * @param record
     * @return null int
     * @author: newway
     * @createDate: 2019-11-26 17:44:27
     */
    int updateByPrimaryKey(ProjectInfo record);

    /**
     * @Author guan
     * @Description 根据组织机构查询项目信息
     * @Date 10:50 2019-12-26
     * @Param [obsCode]
     * @return java.util.List<com.tgpms.web.earlierStage.entity.ProjectInfo>
     **/
    List<Map<String, Object>> selProjectInfoTreeList(@Param("map")Map<String, Object> map);

    List<Map<String, Object>> selAllProjectInfoTreeList(@Param("map")Map<String, Object> map);
}